package com.itedge.solutionmanager.taskdata.impl.solution;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
import javax.validation.constraints.Size;

import org.springframework.format.annotation.DateTimeFormat;

import com.itedge.solutionmanager.enumeration.MeetingResult;
import com.itedge.infrastructure.taskdata.impl.AbstractTaskDataEntity;

@Entity
@Table(name="ARCH_MEET_OUT_TASK_DATA")
public class ArchiveMeetingOutputTaskData extends AbstractTaskDataEntity {
	
	@Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "id")
    private Long id;	

	@Version
    @Column(name = "version")
    private Integer version;
	
	@Column(name ="NOTES")
	@Size(max = 4000)
	private String notes;
	
    @Enumerated(EnumType.ORDINAL)
    @Column(name="RESULT")
    private MeetingResult result;
    
	@Column(name="REAL_MEETING_DATE")
    @Temporal(TemporalType.TIMESTAMP)
	@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
    private Date realMeetingDate;

	public MeetingResult getResult() {
		return result;
	}

	public void setResult(MeetingResult result) {
		this.result = result;
	}

	public Date getRealMeetingDate() {
		return realMeetingDate;
	}

	public void setRealMeetingDate(Date realMeetingDate) {
		this.realMeetingDate = realMeetingDate;
	}

	@Override
	public Long getId() {
        return this.id;
    }

	public void setId(Long id) {
        this.id = id;
    }	

	@Override
	public Integer getVersion() {
        return this.version;
    }

	@Override
	public void setVersion(Integer version) {
        this.version = version;
    }
	
	public void setNotes(String notes) {
		this.notes = notes;
	}
	
	public String getNotes() {
		return this.notes;
	}
}